package com.leo.filter;

import com.leo.util.InnerObjectUtile;
import com.opensymphony.xwork2.ActionInvocation;
import com.opensymphony.xwork2.interceptor.MethodFilterInterceptor;

public class UserInterceptor extends MethodFilterInterceptor {

	private static final long serialVersionUID = -782706110048048600L;

	@Override
	protected String doIntercept(ActionInvocation invocation) throws Exception {
		String status = InnerObjectUtile.SESSION.getMap().get("username");
		if (status == null) {
			// 登录超时
			//System.out.println("logintimeout");
			return "logintimeout";
		}
		return invocation.invoke();
	}
}
